You can use a mask constant of type ATSLineLayoutOptions to set or obtain the line layout options in a line of text or an entire text layout object; see the functions ATSUSetLineControls and ATSUSetLayoutControls, respectively.
enum {
kATSLineNoLayoutOptions = 0x00000000,
kATSLineIsDisplayOnly = 0x00000001,
kATSLineHasNoHangers = 0x00000002,
kATSLineHasNoOpticalAlignment = 0x00000004,
kATSLineKeepSpacesOutOfMargin = 0x00000008,
kATSLineNoSpecialJustification = 0x00000010,
kATSLineLastNoJustification = 0x00000020,
kATSLineFractDisable = 0x00000040,
kATSLineImposeNoAngleForEnds = 0x00000080,
kATSLineFillOutToWidth = 0x00000100,
kATSLineTabAdjustEnabled = 0x00000200,
kATSLineAppleReserved = (long)0xFFFFFC00
};
typedef UInt32 ATSLineLayoutOptions
Constant descriptions
kATSLineNoLayoutOptions
Indicates that no bits are set. Available with ATSUI 1.0.
kATSLineIsDisplayOnly
If the bit specified by this mask is set, ATSUI creates the text layout object without the internal information needed for editing the text layout; it is for display purposes only. This allows ATSUI to display the text layout faster and make the text layout object smaller. When the user edits the text layout object, you must clear this flag.
Available with ATSUI 1.0.
kATSLineHasNoHangers
If the bit specified by this mask is set, the automatic hanging punctuation in the text layout object is overridden. The value in this bit overrides any adjustment to hanging punctuation set for a style run inside the text layout object using the style run attribute tags kATSUForceHangingTag or kATSUHangingInhibitFactorTag. Available with ATSUI 1.0.
kATSLineHasNoOpticalAlignment
If the bit specified by this mask is set, the optical alignment of characters at the text margin of the text layout object will not occur. Optical alignment adjusts characters at the text margin so that they appear to be properly aligned; strict alignment can often cause the illusion of a ragged edge. The value in this bit overrides any adjustment to optical alignment set for a style run inside the text layout object using the style run attribute tag kATSUNoOpticalAlignmentTag. Available with ATSUI 1.0.
kATSLineKeepSpacesOutOfMargin
If the bit specified by this mask is set, the trailing white spaces at the end of a line of justified text are placed outside the margin. Available with ATSUI 1.0.
kATSLineNoSpecialJustification
If the bit specified by this mask is set, postcompensation actions will not be taken, even if necessary. This flag cannot be set for a single line of a text layout object. The value in this bit overrides any adjustment to the postcompensation actions set for a style run using the style run attribute tag kATSUNoSpecialJustificationTag. Available with ATSUI 1.0.
kATSLineLastNoJustification
If the bit specified by this mask is set, the last line of a justified text layout object will not be justified. This flag is meaningless when setting a line's text layout attributes. Available with ATSUI 1.0.
kATSLineFractDisable
If the bit specified by this mask is set, the position of the text in the line or text layout object will be relative to fractional absolute positions, which are uncorrected for device display. This provides the ideal position of laid-out text and is useful for scaling text on the screen. This origin is also used to get the width of the typographic bounding rectangle when you call ATSUMeasureText. Available with ATSUI 1.1.
kATSLineImposeNoAngleForEnds
If the bit specified by this mask is set, carets on the far right and left sides of an unrotated line will always be vertical, no matter what the angle of text. Available with ATSUI 1.1.
kATSLineFillOutToWidth
If the bit specified by this mask is set, highlighting extends to both ends of a line, regardless of caret locations. It does not change caret locations. This is provided for your convenience to extend your highlighting to the full width of the line. Available with ATSUI 1.1.
kATSLineTabAdjustEnabled
If the bit specified by this mask is set, the tab character width will be automatically adjusted to fit the specified line width. You must set this bit to ensure that highlighting is done correctly across tab stops. To ensure this, you should also set the bit specified by the kATSLineImposeNoAngleForEnds mask constant. Available with ATSUI 1.2.
kATSLineAppleReserved
If the bit specified by this mask is set, line layout mask values (and the bits they specify) between kATSLineNoLayoutOptions and kATSLineAppleReserved are reserved. ATSUI will return the kATSUInvalidAttributeValueErr result code if you set a reserved bit. Available with ATSUI 1.1.
VERSION NOTES
This enumeration is available beginning with ATSUI 1.0. Additional constants added with ATSUI 1.1 and 1.2.